import request from '/@/utils/request';
import * as config from './config'

export const questionsList = (data) => request.post(config.questions, data)

export const getQuestionsByTeam = (teamId, sortFlag) => request.post(config.questionsByTeam + teamId + "/" + sortFlag)

export const delQuestions = (ids) =>request.delete(config.questionURD+ids)

export const postStarQuestion = (questionId, type) => request.post(config.starQuestion + questionId + '/' + type)

export const submitAnswers = (questionId, answerId) => request.post(config.submitAnswers + questionId + '/' + answerId)

export const clearRedistData = (teamId) => request.post(config.clearContinueQuestion + teamId)

//添加问题
export const addQuestion = (data)=>request.post(config.questionURD,data)
//修改问题
export const editQuestion = (data)=>request.put(config.questionURD+data.id,data)